<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        div{
            width: 200px;
            height: 200px;
            background-color: green;
        }
    </style>
</head>
<body>
<div onmouseover="overfn()" onmouseout="outfn()"
onmousedown="downfn()" onmouseup="upfn()" onmousemove="movefn()"></div>
<script>
    function overfn() {
        console.log("鼠标移入")
    }
    function outfn() {
        console.log("鼠标移出")
    }
    function downfn() {
        console.log("鼠标按下")
    }
    function upfn() {
        console.log("鼠标抬起")
    }
    function movefn() {
        console.log("鼠标移动")
    }
</script>
</body>
</html>